#!/bin/bash

rpmquery()
{
	if [ $# -lt 1 ]; then
		echo "rpmquery [repo name]"
		return 1
	fi
	reponame=$1
	RPMS=`find -name "*.rpm"`

	for rpm in $RPMS
	do
		rpm -qpa --queryformat "%{NAME}.%{ARCH} %{EPOCH}:%{VERSION}-%{RELEASE} $reponame\n" $rpm
	done
}
